<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="../../../../common/header.jsp"%>
<html>
<head>
	<title>内容编辑页面</title>
    <!-- 配置文件 -->
    <script type="text/javascript" src="../../../../ueditor/ueditor.config.js"></script>
    <!-- 编辑器源码文件 -->
    <script type="text/javascript" src="../../../../ueditor/ueditor.all.js"></script>
    <script type="text/javascript" charset="utf-8" src="../../../../ueditor/lang/zh-cn/zh-cn.js"></script>
    <script type="text/javascript">
    	function saveArticle(){
    		$("#Form").submit();
    	}
    </script>
</head>
<body>
<div style="width: 1010px;margin: 0 auto;">
	<form:form class="forms" id="Form" action="${ctx }/article/save" method="POST" modelAttribute="user">
		<input type="hidden" name="id" value="${article.id }" />
		<input type="hidden" name="createUserId" value="${activeUser.userid }" />
		<fieldset>
			<p>
				<span>文章标题:</span>
				<input class="text-input required" type="text" style="width: 700px; margin-left: 10px;" maxlength="100" name="articleTitle"/>
			</p>	
		</fieldset>
	    <script id="editor" type="text/plain" style="width:1024px;height:500px;" name="articleContent"></script><br/>
	</form:form>
    <div style="text-align: center;"><a href="javascript:saveArticle()" class="button" style="opacity:1; text-align: center;">保存</a></div>
</div>

<script type="text/javascript">
    //实例化编辑器
    //建议使用工厂方法getEditor创建和引用编辑器实例，如果在某个闭包下引用该编辑器，直接调用UE.getEditor('editor')就能拿到相关的实例
    UE.getEditor('editor', {
    	toolbars: [
    	           ['fullscreen', 'undo', 'redo','bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc','simpleupload']
    	       ]
    });
    
</script>
</body>
</html>
<%@ include file="../../../../common/footer.jsp"%>